import request from '@/utils/request'
/**
 * 封装权限列表的请求
 */
export const getRightList = () => {
  return request({
    url: '/api/sys/permission',
    method: 'get'
  })
}
/**
 * 封装权限列表的请求
 */
export const addRightList = (data) => {
  return request({
    url: '/api/sys/permission',
    method: 'POST',
    data
  })
}
/**
 * 封装权限列表的请求
 */
export const delRightList = (id) => {
  return request({
    url: `/api/sys/permission/${id}`,
    method: 'DELETE'
  })
}
/**
 * 封装权限列表的请求
 */
export const editRightList = (data) => {
  return request({
    url: `/api/sys/permission/${data.id}`,
    method: 'PUT',
    data
  })
}

